//================v1要点总结===============
/**
 * 最简单的,直接字符串颠倒,补齐剩余的0
 * 
 */

/**
 * @param {number} n - a positive integer
 * @return {number} - a positive integer
 */
var reverseBits = function (n) {
    let rslt = [...n.toString(2)].reverse()
    rslt.push(...new Array(32 - rslt.length).fill(0))
    return Number.parseInt(rslt.join(""), 2)
};

console.log(reverseBits(11))